/**
 * Copyright (c) 2013 Axa Holding Belgium, SA. All rights reserved.
 * This software is the confidential and proprietary information of the AXA Group.
 */
package chabernac.android.chargemybattery.actions;

public abstract class AbstractPowerSaveAction implements iPowerSaveAction {

    private boolean isEnabled;

    @Override
    public boolean isEnabled() {
        return isEnabled;
    }

    public void setEnabled( boolean aEnabled ) {
        isEnabled = aEnabled;
    }

    @Override
    public void execute() {
        if ( isEnabled ) {
            executeAction();
        }
    }

    protected abstract void executeAction();

}
